package cc.fs.kotlin.ui.activity.helper

import android.app.Fragment
import android.app.ProgressDialog

/**
 * Created by fostion on 2/19/16.
 */
open class BaseFragment : Fragment() {
    /** 显示正在加载dialog */
    var waitDialog: ProgressDialog ?= null
    fun showWaitDialog(){
        if(waitDialog == null){
            waitDialog = ProgressDialog(activity)
            waitDialog?.setMessage("正在加载...")
            waitDialog?.show()
        } else {
            waitDialog?.show()
        }
    }

    fun hidenWaitDialog(){
        if(waitDialog != null){
            waitDialog?.dismiss()
        }
    }
}